<?php
   include_once($_SERVER['DOCUMENT_ROOT']."/swo.cfg.php");
   include_once("$admin_path/cfg/pages.cfg.php");
   include_once("$admin_path/lib/access.php");
   include_once("$root_path/util/dbUtil.php");
   include_once("$root_path/util/commonUtil.php");
   include_once("$root_path/cfg/dbTables.cfg.php");
  //Admin Page Controler
   $pageId = $_REQUEST["pageId"];
 
   if ($pageId == "")
        $pageId=0;
   
   $loginObj = new LoginManager();
   $loginStatus = $loginObj -> isLoggedIn();
   if ($loginStatus != true)
     {
       $pageId=0;
     }
 
   
   //Create Page Content   exclude for login page
   if ($pageId != 0)
      include_once ("inner/header.php");
	  
   //Main contain
   $bodyPage = $pager[$pageId];
   if ($bodyPage == "")
       $bodyPage = "404";
   $bodyPage .= ".php";
    
   include_once("inner/$bodyPage");
   
   if ($pageId != 0)
      include_once ("inner/footer.php");
?>